VERSION 5.00
Object = "{C4847593-972C-11D0-9567-00A0C9273C2A}#8.0#0"; "crviewer.dll"
Begin VB.Form frmReportWriterViewer 
   Caption         =   "Preview"
   ClientHeight    =   5160
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7065
   LinkTopic       =   "Form1"
   ScaleHeight     =   5160
   ScaleWidth      =   7065
   StartUpPosition =   3  'Windows Default
   Begin CRVIEWERLibCtl.CRViewer CRViewer1 
      Height          =   4995
      Left            =   60
      TabIndex        =   0
      Top             =   60
      Width           =   6945
      lastProp        =   500
      _cx             =   5080
      _cy             =   5080
      DisplayGroupTree=   -1  'True
      DisplayToolbar  =   -1  'True
      EnableGroupTree =   -1  'True
      EnableNavigationControls=   -1  'True
      EnableStopButton=   -1  'True
      EnablePrintButton=   -1  'True
      EnableZoomControl=   -1  'True
      EnableCloseButton=   -1  'True
      EnableProgressControl=   -1  'True
      EnableSearchControl=   -1  'True
      EnableRefreshButton=   -1  'True
      EnableDrillDown =   -1  'True
      EnableAnimationControl=   -1  'True
      EnableSelectExpertButton=   0   'False
      EnableToolbar   =   -1  'True
      DisplayBorder   =   -1  'True
      DisplayTabs     =   -1  'True
      DisplayBackgroundEdge=   -1  'True
      SelectionFormula=   ""
      EnablePopupMenu =   -1  'True
      EnableExportButton=   0   'False
      EnableSearchExpertButton=   0   'False
      EnableHelpButton=   0   'False
      LaunchHTTPHyperlinksInNewBrowser=   -1  'True
   End
End
Attribute VB_Name = "frmReportWriterViewer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim crappl As New CRAXDRT.Application
Dim crRep As CRAXDRT.Report

Private Sub Form_Load()
Dim crdb As CRAXDRT.Database
Dim CrTables As CRAXDRT.DatabaseTables
Dim CrTable As CRAXDRT.DatabaseTable

    Set rsRep1 = New ADODB.Recordset

    rsRep1.CursorLocation = adUseClient
    rsRep1.Open frmReportWriter.txtRemarks.Text, _
            cn, adOpenStatic, adLockBatchOptimistic
    rsRep1.MarshalOptions = adMarshalModifiedOnly


Set crappl = CreateObject("crystalruntime.application")

'''''''''''''''Between comments is where you would select the
'''''''''''''''correct report path for your SQL above
Set crRep = crappl.OpenReport(App.Path & "\" & Trim(frmReportWriter.txtFileName.Text) & ".rpt")
'''''''''''''''Between comments is where you would select the
'''''''''''''''correct report path for your SQL above

CRViewer1.ReportSource = crRep

Set crdb = crRep.Database
Set CrTables = crdb.Tables
Set CrTable = CrTables(1)

CrTable.SetDataSource rsRep1, 3
CRViewer1.ViewReport

End Sub

Private Sub Form_Resize()
    CRViewer1.Top = 0
    CRViewer1.Left = 0
    CRViewer1.Height = ScaleHeight
    CRViewer1.Width = ScaleWidth
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set frmReportWriterViewer = Nothing
End Sub



